package com.lagou.dubboconsumer;

import com.lagou.dubboapi.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangxuyuan
 * @version 1.0
 * @date 2020/12/18
 */
@RestController
public class IndexController {

    @Reference
    HelloService helloService;

    @GetMapping("/hello/{name}")
    public String hello(@PathVariable("name")String name)
    {
        return helloService.sayHelloA(name);
    }
}
